; Recursive dice-like random number generation function
; Written in Guile/Scheme, tested with GNU Guile 2.0.5
; Copyright 2012 Joey Sabey
; Licensed under the MIT License - http://opensource.org/licenses/mit-license.php
(set! *random-state* (random-state-from-platform))
(define dice
 (lambda ($number $sides)
  (if (> $number 1)
   (+ (+ (random $sides) 1) (dice (- $number 1) $sides))
   (+ (random $sides) 1))))
